package com.example.dirviesystem.coach.controller;

import com.example.dirviesystem.entity.DrivingType;
import com.example.dirviesystem.coach.service.DrivingTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/driving-types")
public class DrivingTypeController {

    @Autowired
    private DrivingTypeService drivingTypeService;

    @GetMapping
    public List<DrivingType> getAllDrivingTypes() {
        return drivingTypeService.findAll();
    }
}